import fromItem from '@/components/from-item/from-item.vue'
	export default {
		components: {
			fromItem,
		},
		data() {
			return {
				//// 加载
				// width: '150rpx',
				// height: '100rpx',
				// shadeShow: false,
				// backgroundColor: "transparent",
				//// 加载
				totalData: {
					fId: "", //传fid表示修改 不传表示新增
					userId: "", //当前登录人id
					userName: "", //当前登录人姓名
					fSamplereportid: "", //试验名称*
					fSamplereportname: "", //试验名称id*
					fCompletiondates: "", //预计完成日期*
					fTestperson: "", //试验人
					fTestpersonid: "", //试验人id
					fTestnote: "", //备注
				},
				userInfo: null,
				options: null, //上个页面传递过来的参数
			};
		},

		onReady() {},

		onLoad(options) {
			console.log('options', options);
			var that = this;
			uni.getStorage({ //监督检查方式
				key: 'userInfo',
				success: function(res) {
					that.userInfo = JSON.parse(res.data);
				}
			});
			that.options = options;
			that.getDetailData(options.id);
			// || MP-WEIXIN || H5
			// #ifdef APP-PLUS
			// this.playVideo()

			// #endif
			// #ifdef H5

			// #endif

		},
		onShow() {},
		onUnload() {},

		methods: {
			getDetailData(id) {
				var that = this;
				var datas = {
					fId: id,
				}
				that.$http.getSampleWorkTestByFid(datas).then(res => {
					if (res.errcode == 0) {
						that.totalData = res.data.lrCheckSample;
					} else {
						uni.showToast({
							title: "请求失败",
							icon: 'none',
							duration: 2000
						});
					}

				}, (err) => {
					uni.showToast({
						title: "接口报错",
						icon: 'none',
						duration: 2000
					});
				})
			},
			

		}
	}